<?php
	session_start();
	$date=$_GET['date'];
        $date2=$_GET['date2'];
	header("Cache-Control: no-store, no-cache, must-revalidate");
if ( (session_is_registered('sesId') || session_is_registered('cvecliente')) ){
	if (session_is_registered('rango') && !empty($date)&& !empty($date2)){
                session_unregister('rango');
		require("templates/func_consulta_cliente.php");
		?>
		<html xmlns="http://www.w3.org/1999/xhtml">
		<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />	
		<script type="text/javascript" src="javascripts/prototype.js"> </script> 
		<script type="text/javascript" src="javascripts/effects.js"> </script>
		<script type="text/javascript" src="javascripts/window.js"> </script>
		<script type="text/javascript" src="javascripts/window_effects.js"> </script>
		<script type="text/javascript" src="javascripts/debug.js"> </script>
		<link href="themes/default.css" rel="stylesheet" type="text/css" >	 </link>
		<link href="themes/alphacube.css" rel="stylesheet" type="text/css" >	 </link>
			<LINK REL="stylesheet" TYPE="text/css" HREF="css/style.css">
		<title>GRUPO MORSA</title>
		</head>
		<body>
		<script>
			var index= 0;
			var contentWin = null;
			var win;
			
			
		</script>
				<center><h5>Listado de Pedidos</h5></center>
				<br>
				<div id="footer"></div>

			             <?php echo Listado_pedidos($date,$date2); ?>

		</body>
		</html>
		<?php
			}else{
		?>
		<HTML>
		<head>

		<script type="text/javascript" src="javascripts/prototype.js"> </script> 
		<script type="text/javascript" src="javascripts/effects.js"> </script>
		<script type="text/javascript" src="javascripts/window.js"> </script>
		<script type="text/javascript" src="javascripts/window_effects.js"> </script>
		<script type="text/javascript" src="javascripts/debug.js"> </script>
		<link href="themes/default.css" rel="stylesheet" type="text/css" >	 </link>
		<link href="themes/alphacube.css" rel="stylesheet" type="text/css" >	 </link>

		</head>
		<body>
                <script>
			var index= 0;
			var contentWin = null;

			win = new Window('dialog1', {className: "alphacube",  width:520, height:300, zIndex: 100, resizable: false, scrollbars: false, url: "ped_fi_ff.php", title: "Consulta Pedidos por Periodo", showEffect:Element.show, hideEffect: Effect.SwitchOff, draggable:false})
			win.showCenter();

		</script>
		</body>
		</html>
		<?php
			
	}

}else{
	header("LOCATION:index.php");
}
?>
